from django.conf.urls import patterns, include, url

from django.conf import settings
from django.conf.urls.static import static

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

from .views import HomeView

urlpatterns = patterns('',
    url(r'^admin_tools/', include('admin_tools.urls')),
    # Examples:
    # url(r'^$', 'cookmarks.views.home', name='home'),
    # url(r'^cookmarks/', include('cookmarks.foo.urls')),
    url('^recipes/', include('yummy.urls', namespace='yummy')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    # i18n
    url(r'^i18n/', include('django.conf.urls.i18n')),
    #account
    url(r'^password/reset/$', 'password_reset',
        {'template_name': 'userprofiles/password_reset.html',
         'email_template_name': 'userprofiles/mails/password_reset_email.html',
         'subject_template_name': 'userprofiles/mails/password_reset_subject.html',},
        name='auth_password_reset'),

    # users profile
    url(r'^users/', include('apps.accounts.urls', namespace="users")),
    # accounts
    url(r'^accounts/', include('userprofiles.urls')),
    # gallery
    url(r'^photologue/', include('photologue.urls')),
    # avatars
    url(r'^avatar/', include('avatar.urls')),
    # editor
    #url(r'^ckeditor/', include('ckeditor.urls')),
    # main
    url('^$', HomeView.as_view(), name='home'),
)

urlpatterns += static(settings.MEDIA_URL,
                document_root=settings.MEDIA_ROOT,
                show_indexes=False)

